package net.easyjava.third.sms.huyi.result;

import net.easyjava.third.sms.huyi.HuyiConstants;
import net.easyjava.tools.BaseBean;

/**
 * Created by wenxiaoning on 16/6/21.
 */
public class SendResult extends BaseBean {

    private static final long serialVersionUID = -5957064143322131544L;
    private String smsId;
    private int code;
    private String msg;

    public SendResult() {
    }

    public SendResult(String smsId, int code, String msg) {
        this.smsId = smsId;
        this.code = code;
        this.msg = msg;
    }

    /**
     * 判断是否成功
     * @return
     */
    public boolean isSuccess(){
        return this.code == HuyiConstants.RESULT_SUCCESS;
    }

    public String getSmsId() {
        return smsId;
    }

    public void setSmsId(String smsId) {
        this.smsId = smsId;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
